package com.ruoyi.system.service;

import com.ruoyi.system.domain.User;
import com.ruoyi.system.mapper.UserMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public List<User> selectAllUser(){

        return userMapper.selectAllUser();
    }
    public int delete( @Param("id") int id){
        return userMapper.delete(id);
    }
    public int save(User user){
        return userMapper.insert(user);
    }

    public int update(User user){
        return userMapper.update(user);
    }
}